<div class="page">
	<div class="page-head">
		<h1 class="font-thin h4">线路报价管理</h1>
	</div>
	<div class="client-tab">
		<span ui-sref="app.client.client_editNew">基本信息</span>
		<span ui-sref="app.client.customerrepresentative_manageNew">客户代表</span>
		<span ui-sref="app.client.goodstype_manageNew">货物分类</span>
		<span ui-sref="app.client.goods_manageNew">货物</span>
		<span ui-sref="app.client.settleManagentNew">结算方</span>
		<span class="client-tab-cur" >线路报价</span>
		<span ui-sref="app.client.projectManagentNew">工程</span>
        <span ui-sref="app.client.clientinfo_manageNew">客户资料</span>
        <span ui-sref="app.client.returnPeriodNew">对账回款周期</span>
	</div>
	<div class="page-body">
        <form name="step6" id="lineProceForm" class="form-validation" novalidate ng-controller="linePriceManagentControllerNew">
             <!--form-horizontal-->
            <div class="list-body">
                <div class="client-company">						
                    <label class="control-label pull-left client-companyLabel">客户单位：</label>
                    <div class="col-md-2 form-group">
                        <label class="control-label pull-left client-companyDetail">{{clientName}}</label>
                    </div>
				</div>

                <div class="list-query">
                    <div class="query-terms" ng-if="queryTermsFilterList[0].visible">
                        <label class="control-label pull-left">价格状态：</label>
                        <select id="linePrice_priceState" class="form-control input-sm query-term tms-select" name="priceState" ng-model="queryTerms.priceState" ng-options="x.value as x.text for x in priceStateDropDown">
                            <option value="">全部</option>
                        </select>
                    </div>

                    <div class="query-terms" ng-if="queryTermsFilterList[1].visible">
                        <label class="control-label pull-left">起始地：</label>
                        <input id="linePrice_beginAddress" type="text" class="form-control input-sm query-term" id="fa-searchz-begin-address" ng-model="queryTerms.beginAddress" name="begin-address" placeholder="请输入起始地">
                    </div>
                    

                    <div class="query-terms" ng-if="queryTermsFilterList[2].visible">
                        <label class="control-label pull-left">货物分类：</label>
                        <select id="linePrice_goodsTypeId" class="form-control input-sm query-term tms-select" ng-model="queryTerms.goodsTypeId" name="goodsTypeId" ng-options="x.id as x.name for x in goodsTypeDropDown">
                            <option value="">全部</option>
                        </select>
                    </div>

                    <div class="query-terms" ng-if="queryTermsFilterList[3].visible">
                        <label class="control-label pull-left">目的地：</label>
                        <input id="linePrice_endAddress" type="text" class="form-control input-sm query-term" id="fa-searchz-end-address" ng-model="queryTerms.endAddress" name="endAddress" placeholder="请输入目的地">
                    </div>

                    <div class="query-terms">
                        <label class="control-label pull-left"></label> 
                        <button id="linePrice_query" ng-click="queryFunc()" class="btn tms-btn tms-btn-search" ng-class="{'disabled':querying}" ng-disabled="querying">
                            <i class="fa fa-search" ng-show="!querying"></i>
                            <i class="fa fa-spinner no-bordr" ng-show="querying" ng-class="{'fa-spin':querying}"></i>
                            <span ng-show="!querying">查询</span>
                            <span ng-show="querying">查询中...</span>
                        </button>
                    </div>
                </div>

                <div class="list-btn-area">
                    <button id="linePrice_add" data-toggle="modal" data-target="#lineprice" class="btn tms-btn tms-btn-add" ng-click="addLinePrice()">添加</button>
                    <div class="list-filter-container">
                        <tms-list-filter 
                            tab-head-filter="tabHeadFilter(item)"
                            query-terms-filter-list="queryTermsFilterList"
                            tab-head-filter-list="tabHeadFilterList"
                        ></tms-list-filter>
                    </div>
                </div>

                <div class="list-table">
                    <div class="table-responsive">
                        <div ui-grid="gridOptions" ui-grid-pagination ui-grid-auto-resize ui-grid-resize-columns style="height:{{heightA}}px;overflow:hidden; min-width:1650px;">
                            <div class="watermark" ng-if="!gridOptions.data.length">暂无数据</div>
                        </div>

                    </div>
                </div>
                

            </div>

                <!-- Modal -->
                <div class="modal fade bs-example-modal-lg" id="lineprice" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static">
                    <div class="modal-dialog modal-lg">
                        <div class="modal-content">
                            <div class="modal-header client-modalHeader">
                                <button id="linePrice_miss" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="myModalLabel">{{title}}</h4>
                            </div>
                            <ng-form name="lineForm">
                                <div class="modal-body">
                                    <table class="table-bordered client-table">
                                        <tr>
                                            <td class="client-td-left"><span class="text-danger">*</span>截止日期：</td>
                                            <td class="client-td-right">
                                                <div class="linePrice-time">
                                                    <div class="input-group input-group-sm date">
                                                        <input id="dataTime" datetimepicker plugintype="datetime" name="openTime" ng-model="detail.openTime" placeholder="起始时间" class="form-control" type="text" required/>
                                                        <span id="opendataTime" class="input-group-addon curpoint">
                                                            <span class="glyphicon glyphicon-calendar"></span>
                                                        </span>
                                                    </div>
                                                </div>
                                                <label class="linePriceTime-label pull-left">至</label>
                                                <div class="linePrice-time">
                                                    <div class="input-group input-group-sm date">
                                                        <input id="dataTimeEnd" datetimepicker plugintype="datetime" name="closeTime" ng-model="detail.closeTime" placeholder="结束时间" class="form-control" type="text" required/>
                                                        <span id="opendataTimeEnd" class="input-group-addon curpoint">
                                                            <span class="glyphicon glyphicon-calendar"></span>
                                                        </span>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left"><span class="text-danger">*</span>起始地：</td>
                                            <td class="client-td-right">
                                                <tms-address class="" province="detail.startProvinceCode" city="detail.startCityCode" area="detail.startAreaCode" city-list="startCityList" area-list="startAreaList" required="true" ischecked="ischecked">
                                                </tms-address>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left"><span class="text-danger">*</span>目的地：</td>
                                            <td class="client-td-right">
                                                <tms-address class="" province="detail.endProvinceCode" city="detail.endCityCode" area="detail.endAreaCode" city-list="endCityList" area-list="endAreaList" required="true" ischecked="ischecked">
                                                </tms-address>                                 
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left"><span class="text-danger">*</span>吨位范围：</td>
                                            <td class="client-td-right linePrice-input linePrice-word">
                                                <input id="linePrice_tonnageRange" type="text" class="form-control input-sm ipt-3" ng-model="detail.tonnageRange" required placeholder="请填写吨位范围" name="tonnageRange">
                                                <label>吨</label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left"><span class="text-danger">*</span>运费价格：</td>
                                            <td class="client-td-right project-selectMa linePrice-input">
                                                <input id="linePrice_price" type="text" ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/" class="form-control input-sm ipt-3" ng-model="detail.price" placeholder="请填写运费价格" name="realName" required>	
                                                <select id="linePrice_priceUnit" class="form-control input-sm ipt-2 tms-select" ng-model="detail.priceUnit" ng-options="x.value as x.text for x in priceUnitDropDown" name="priceUnit" required>
                                                    <option value="">请选择</option>
                                                </select>			                                  
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left"><span class="text-danger">*</span>货物类别：</td>
                                            <td class="client-td-right clientInfo-select">
                                                <select id="linePrice_goodsType" name="goodsTypeId" class="form-control input-sm ipt-2 tms-select" ng-model="detail.goodsTypeId" ng-change="changeGoods()" ng-options="x.id as x.name for x in goodsTypeDropDown" name="goodTypeIdBox" required>
                                                    <option value="">请选择</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left"><span class="text-danger">*</span>货物名称：</td>
                                            <td class="client-td-right clientInfo-select">
                                                <select id="linePrice_goodsId" class="form-control input-sm ipt-2 tms-select" ng-model="detail.goodsId" ng-options="x.id as x.name for x in goodsNameList" name="goodsName" required>
                                                    <option value="">请选择</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left"><span class="text-danger">*</span>装车类型：</td>
                                            <td class="client-td-right clientInfo-select">
                                                <select id="linePrice_loadingType" class="form-control input-sm ipt-2 tms-select" ng-model="detail.loadingType" ng-options="x.value as x.text for x in loadingTypeDropDown" name="loodingType" required>
                                                    <option value="">请选择</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left"><span class="text-danger">*</span>车长：</td>
                                            <td class="client-td-right clientInfo-select">
                                                <select id="linePrice_carLength" class="form-control input-sm ipt-2 tms-select" ng-model="detail.carLength" ng-options="x.value as x.text for x in carLengthDropDown" name="carLength" required>
                                                    <option value="">请选择</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left"><span class="text-danger">*</span>结算方式：</td>
                                            <td class="client-td-right clientInfo-select">
                                                <select id="linePrice_setleWay" class="form-control input-sm ipt-2 tms-select" ng-model="detail.setleWay" ng-options="x.value as x.text for x in settleWayDropDown" name="setleWay" required>
                                                    <option value="">请选择</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left"><span class="text-danger">*</span>是否含税：</td>
                                            <td class="client-td-right clientInfo-select">
                                                <select id="linePrice_priceType" class="form-control input-sm ipt-2 tms-select" ng-model="detail.priceType" ng-options="x.value as x.text for x in priceTypeDropDown" name="priceType" required>
                                                    <option value="">请选择</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left"><span class="text-danger">*</span>价格状态：</td>
                                            <td class="client-td-right clientInfo-select">
                                                <select id="linePrice_priceStates" class="form-control input-sm ipt-2 tms-select" ng-model="detail.priceState" ng-options="x.value as x.text for x in priceStateDropDown" name="priceState" required>
                                                    <option value="">请选择</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left">公里数：</td>
                                            <td class="client-td-right linePrice-input linePrice-word">
                                                <input id="linePrice_mileage" type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control input-sm ipt-3" ng-model="detail.mileage" placeholder="请填写公里数" name="mileage">
                                                <label>公里</label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left">收货单位：</td>
                                            <td class="client-td-right linePrice-input">
                                                <div angucomplete-alt id="settleContact" placeholder="" pause="100" selected-object="onSelectSettle" remote-api-handler="onSettleComplete" search-fields="name" title-field="name" minlength="1" 
                                                input-class="form-control form-control-small" input-name="d.settleName" match-class="highlight" required>
                                            </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left">收货人电话：</td>
                                            <td class="client-td-right linePrice-input">
                                                <input id="linePrice_settlePhoneNumber" type="tel" class="form-control input-sm ipt-3" ng-model="detail.settlePhoneNumber" placeholder="请填写收货人电话" name="settlePhone" ng-pattern="/^1\d{10}$/">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="client-td-left">备注：</td>
                                            <td class="client-td-right">
                                                <textarea class="form-control project-textarea" ng-model="detail.remarks" placeholder="请再次填写备注" name="remarks"></textarea>
                                            </td>
                                        </tr>
                                    </table>
                                
                                    <div class="clientIfo-bottom tms-editBtn">
                                        <button id="linePrice_save" type="button" class="btn tms-btn tms-btn-save" ng-disabled="!lineForm.$valid" ng-click="detail.click()">保存</button>
                                        <button id="linePrice_dismiss" type="button" class="btn tms-btn tms-btn-miss" data-dismiss="modal">取消</button>   
                                    </div>                                   
                                </div>
                            </ng-form>

                        </div>
                    </div>
                </div>
            <!--</div>-->
        </form>
	</div>
	
</div>